package com.zeroone.star.systemhome.controller.meeting;

import com.zeroone.star.project.dto.systemhome.MeetingDTO;
import com.zeroone.star.project.systemhome.MeetingApis;
import com.zeroone.star.project.vo.JsonVO;
import com.zeroone.star.project.vo.systemhome.MeetingStatisticsVO;
import com.zeroone.star.systemhome.service.meeting.MeetingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @BelongsProject: oa-java
 * @BelongsPackage: com.zeroone.star.systemhome.controller.meeting
 * @Author: dashuai
 * @CreateTime: 2024-11-18  21:28
 * @Description: 会议controller接口
 * @Version: 1.0
 */
@Api(tags = "会议信息")
@RestController
@RequestMapping("/meeting")
public class MeetingController implements MeetingApis {
    @Resource
    private MeetingService meetingService;

    @ApiOperation("查询我的会议列表")
    @GetMapping("query-my-meeting")
    @Override
    public JsonVO<List<MeetingDTO>> queryMyMeetingList(String id) {
        return JsonVO.success(meetingService.listMyMeetingInfo(id));
    }

    @ApiOperation("查询邀请我的会议列表")
    @GetMapping("query-invite-meeting")
    @Override
    public JsonVO<List<MeetingDTO>> queryInviteMeetingList(String id) {
        return JsonVO.success(meetingService.listInviteMeetingInfo(id));
    }

    @ApiOperation("统计会议信息")
    @GetMapping("count-meeting")
    @Override
    public JsonVO<List<MeetingStatisticsVO>> queryMeetingStatistics(String id) {
        return JsonVO.success(meetingService.countMeetingInfo(id));
    }
}
